1. Field of the Invention:
The present invention relates to a color image processing apparatus and method and a computer-readable recording medium in which a color image processing program is recorded, and more particularly to the following color image processes:
(a1) If an input image is different in lightness from an intended image hue to an improper exposure condition at the time of inputting the image, the lightness of the input image are changed so as to approximate to those of the intended image.
(a2) The lightness, hue and chroma of the input image are converted into those of a desired image.
(a3) Even if a color image of an object (particularly a person) has been taken against the light, a characteristic color (particularly a skin color of the person) is changed to a preferred lightness as compared to the original image without changing the lightness of the whole image.
2. Description of the Related Art:
A human being remembers colors of occasionally seen objects, such as skins, sky and trees, as sensuous “memorized colors”. To this end, a human being remembers the “memorized color” of a particular object as an “optimum color” he/she has been felt to be a most preferred color, and feels it as an undesired or unnatural color if the color of a particular object in the image is different from the “optimum color”.
As illustrated in FIG. 18 of the accompanying drawings, when an image of an object (apple) 72 is taken by a digital camera 73 under a light 71 having a proper lightness, light emitted by the light 71 is reflected on the object 72 and then enters the digital camera 73 as reflected light 74, whereupon the entered light is converted into electrical output values by three CCDs (Charge Coupled Device) 75 corresponding to RGB (Red, Green, Blue). An example of the respective output values of the Red, Green and Blue CCDs 75 is shown in FIG. 19.
FIG. 20 illustrates another situation in which an image of the object (apple) 72 is taken by the same digital camera 73 under a light 76 having an inadequate lightness. Also in this situation, light emitted from the light 76 is emitted on the object 72 and then enters the digital camera 73 as reflected light 77, whereupon the entered light is converted into electrical output values respectively by the Red, Green and Blue CCDs 75. An example of the respective output values of the Red, Green and Blue CCds 75 is shown in FIG. 21.
FIG. 22 shows the output values of the CCDs 75 in terms of L*C* when an image of the object 72 is taken. As shown in FIG. 22, the output values (FIG. 19) of the CCDs 75 in the case of the proper exposure are converted into color values, i.e. the original color values of the object, corresponding to a position designated by reference character 78. On the other hand, the output values (FIG. 21) of the CCDs 75 in the case of the inadequate exposure are converted into color values corresponding to a position designated by reference 79; these color values, namely, lightness (L*) and chroma (C*), each decrease as compared to that in the case of the proper exposure.
Also, when an image of the object is taken against the light, a color in the resulting image would occasionally be far different from the memorized or optimum color.
FIG. 23 illustrates the last-named situation in which an image of an object is taken against the light. In this against-the-light situation, the object (person 105) and a background 103 are simultaneously taken by a digital camera 102.
In this situation, a problem is the location of a light source (sun 101). Light 107 emitted from the sun 101 toward the background 103 strikes the surface of the background 103 whose image is to be taken by the digital camera 102. In the meantime, the light 106 emitted from the sun 101 toward the object 105 strikes only the rear surface of the object whose image is not to be taken by the digital camera 102.
As the result, an against-the-light photograph 108 shown in FIG. 24 would be taken. In this photograph 108, the image of the background 110 is normally taken, but the image of only the most significant object, i.e. the person 109, would result in inadequate exposure so that the colors of the person 109 would be far different from the optimum colors. Though attached importance to either the background 110 or the object (person 109), the lightness of such image cannot be best. As an alternative, a moderate or reasonable lightness, namely, a compromise for both of the background 110 and the object 109 would be an optimum lightness.
Under these circumstances, a color image processing apparatus for changing/converting an inadequate-exposure image, an over-exposure image, or an against-the-light image into an apparently natural image or a desired-color image has been demanded.
As a solution when an image whose lightness is improper or a color image whose color of a skin, sky and tree is different from its memorized color is input, there is currently known a color correcting method in which the input color is corrected by making changes to various parameters such as tone curve and color balance of RGB.
However, the amount of change of parameters is not proportional to the amount of correction of color a human being feels, proposing no guideline for correction of color. Consequently, color correction must be done on a try-and-error basis so that a person without specialized knowledge could not obtain a desired image.
In order to solve this problem, an improved input system is disclosed in Japanese Patent Publication No. 2585754 (hereinafter called “Prior Art Reference 1”). According to Prior Art Reference 1, correction of color is made in the following procedure:
(b1) An input image is pre-scanned. Then, using a fussy reasoning, image classification information is created based on information, such as histogram, density average and maximum density, about the pre-scanned image.
(b2) When a request is made by the user, finishing information, e.g. gray points, light/dark, preference, tone and motif/pattern, is obtained in accordance with the request.
(b3) Processing parameters for correction of the color image are obtained based on the image classification information created in (b1) and the finishing information obtained in (b2).
(b4) Using the processing parameters obtained in (b3), the color image is processed to optimize the lightness.
As another solution, an image editing method and system is disclosed in Japanese Patent Laid-Open Publication No. Hei 8-221546 (hereinafter called Prior Art Reference 2). According to Prior Art Reference 2, a skin color of an input image is optimized by making a change of color in the following procedure:
(c1) A color value as the optimum color of the skin color is prepared.
(c2) An color image is displayed, whereupon an area of the skin color to be corrected is designated by the user.
(c3) In the area designated in (c2), a color (point) to be met with the optimum color is designated.
(c4) Whole of the area designated in (c2) about the point designated in (c3) is corrected so as to assume colors about the optimum color.
However, according to the above-mentioned Prior Art Reference 1, there are the following problems:
(d1) Even if an input image is either a night-view image, whose density average is originally high, or a snow-covered-mountain-view image, whose density average is originally low, the input image would be converted into an image having the same density average. As the result, a lightness histogram (distribution of lightness) of the night-view image, whose density average is originally high, would be biased toward the low (dark) side as shown in FIG. 25A, while a lightness histogram (distribution of lightness) of the snow-covered-mountain-view image, whose density average is originally low, would be biased toward the high (light) side as shown in FIG. 25B. Either of the image having the lightness histogram of FIG. 25A and the image having the lightness histogram of FIG. 25B would be converted/changed into an image whose lightness histogram is moderate at maximum as shown in FIG. 25C. The resulting image would be far remote in lightness from the original image.
(d2) Since no memorized color is not considered, it is impossible to make a color change in accordance with the optimum color.
(d3) A lightness histogram of the against-the-light image has a peak at either of the low (dark) and high (light) sides as shown in FIG. 26; namely, the density average of the whole against-the-light image would be a substantially moderate value (normal value) Therefore, the against-the-light image would be recognized as not too far biased in light-dark balance and hence would be seen as a normal-lightness image so that a lightness correction cannot be made.
According to the above-mentioned Prior Art Reference 2, since only the area designated by the user is changed, combination of the color of the color-converted area and the color of the boundary area therearound would be out of harmony. For example, when an image of a person is taken in a gloomy room, it would result in an inadequate exposure. If a face of the person is designated for change or conversion of color and a skin color is converted into the optimum color, the skin color will be pleasing while the unchanged portions, such as head hair and clothing, other than the designated area will be left unchanged as dark. The resulting image would be an unnatural image with only the skin color being conspicuous.